package cn.edu.scau.entity;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

/**
 * 实体类Manager
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class Manager implements Serializable {
    /**
     * 用户id
     */
    private Integer userId;
    /**
     * 用户账号
     */
    private String userAccount;
    /**
     * 用户联系电话
     */
    @Pattern(regexp = "^\\d{3,4}-\\d{8}$",message = "电话不合法,形如025-12345678、0555-12345678")
    private String userTelephone;
    /**
     * 用户密码
     */
    @NotBlank(message = "用户密码不能为空")
    @Length(min = 6 ,message = "用户密码不能少于7位")
    private String userPassword;
    /**
     * 用户职权
     */

    private Integer userPosition;
    /**
     * 用户有效标志符
     */
    private Boolean userUseflag;

    private static final long serialVersionUID = 1L;

}